package com.atguigu.tingshu.account.client;

import com.atguigu.tingshu.account.client.impl.UserAccountDegradeFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.vo.account.AccountLockResultVo;
import com.atguigu.tingshu.vo.account.AccountLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
//@FeignClient(value = "service-account", fallback = UserAccountDegradeFeignClient.class)
@FeignClient(value = "service-account")
public interface UserAccountFeignClient {

    @PostMapping("/api/account/userAccount/saveUserAccount/{userId}")
    public Result saveAccount(@PathVariable Long userId);

    @PostMapping("/api/account/userAccount/check/lock")
     Result<AccountLockResultVo> checkLock(@RequestBody AccountLockVo accountLockVo);

    @PostMapping("/api/account/userAccount/reduceAccount/{orderNo}")
     Result reduceAccount(@PathVariable String orderNo);

}